{include file="public/header"}
<script src="__JS__/pintuer.js"></script>
</head>
<body>
<div class="panel admin-panel">
	<div class="panel-head"><strong class="icon-reorder"> 用户列表</strong>
		<a href="{:url('userAdd')}" style="float:right;">添加字段</a>
	</div>
	<form action="{:url('user')}" id="F" method="get">
		<input type="text" placeholder="请输入搜索关键字" name="keywords" class="input" style="width:200px; line-height:17px;display:inline-block" value="{$keywords}"/>
		<a href="javascript:F.submit();" class="button border-main icon-search" > 搜索</a>
	</form>
	<form method="post" action="" id="listform">
		<table class="table table-hover text-center">
			<tr>
				<th width="100" style="text-align:left; padding-left:20px;">ID</th>
				<th width="15%">用户名</th>
				<th width="20%">头像</th>
				<th width="20%">权限</th>
				<th width="310">操作</th>
			</tr>
			{foreach name='list' item='vo' key='k'}
			<tr>
				<td style="text-align:left; padding-left:20px;"><input type="checkbox" name="id[]" value="" />{$vo['id']}
				</td>
				<td>{$vo['uname']}</td>
				<td width="10%"><img src="{$vo['logo']}" alt="" width="70" height="50" /></td>
				<td>{$vo['title']}</td>

				<td>
					<div class="button-group">
						<a class="button border-main" href="{:url('userEdit?id='.$vo['id'],input('get.'))}"><span class="icon-edit"></span> 修改</a>
						<a class="button border-red" href="javascript:del()" ><span class="icon-trash-o"></span> 删除</a>
					</div>
				</td>
			</tr>
			{/foreach}
			<tr>
				<td style="text-align:left; padding:19px 0;padding-left:20px;"><input type="checkbox" id="checkall" /> 全选 </td>
				<td colspan="7" style="text-align:left;padding-left:20px;">
					<a href="javascript:DelSelect()" class="button border-red icon-trash-o" style="padding:5px 15px;"> 全删</a>
				</td>
			</tr>
			<tr>
				<td colspan="8">
					<div class="pagelist">
						{$page|raw}
					</div>
				</td>
			</tr>
		</table>
	</form>
</div>
<script>
    //全选
    $("#checkall").click(function(){
        $("input[name='id[]']").each(function(){
            if (this.checked) {
                this.checked = false;
            }
            else {
                this.checked = true;
            }
        });
    })
    // 删除
    function del(){
        if(confirm("确认删除吗?")){

        }
    }
</script>
</body>
</html>